package main

import (
	"fmt"
)

//结构相等的概念
//使用==运算符

// 创建一个结构
type Author struct {
	name      string
	branch    string
	language  string
	Particles int
}

func main() {

	//创建变量
	//作者结构
	a1 := Author{
		name:      "Moana",
		branch:    "CSE",
		language:  "Python",
		Particles: 38,
	}

	a2 := Author{
		name:      "Moana",
		branch:    "CSE",
		language:  "Python",
		Particles: 38,
	}

	a3 := Author{
		name:      "Dona",
		branch:    "CSE",
		language:  "Python",
		Particles: 38,
	}

	//使用==运算符检查a1与a2是否相等
	if a1 == a2 {

		fmt.Println("变量a1等于变量a2")

	} else {

		fmt.Println("变量a1不等于变量a2")
	}

	if a2 == a3 {

		fmt.Println("变量a2等于变量a3")

	} else {

		fmt.Println("变量a2不等于变量a3")
	}
}
